/**
 * futures : masterlink.futures.vo.GreekVar.java
 */
package masterlink.futures.vo;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * TODO Write the description
 *
 * @author : tonyyang
 * Create date : 2011/11/23
 * @version 1.0.0	
 */
@Entity
@Table(name="GREEKS_VAR")
public class GreeksVar implements Serializable{

	private static final long serialVersionUID = 425366462578375730L;
	@Id
	@Column(name="UNIQUEID")
	private Long uniqueid;
	@Column(name="ID")
	private Long id;
	@Column(name="BROKER")
	private String broker;
	@Column(name="account")
	private String account;
	@Column(name="FUTPRICE")
	private Double futprice;
	@Column(name="RATE")
	private Double rate;
	@Column(name="OPT_VAR")
	private Double optVar;
	@Column(name="FUT_VAR")
	private Double futVar;
	@Column(name="sum_var")
	private Double sumVar;
	/**
	 * @return the uniqueid
	 */
	public Long getUniqueid() {
		return uniqueid;
	}
	/**
	 * @param uniqueid the uniqueid to set
	 */
	public void setUniqueid(Long uniqueid) {
		this.uniqueid = uniqueid;
	}
	/**
	 * @return the id
	 */
	public Long getId() {
		return id;
	}
	/**
	 * @param id the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}
	/**
	 * @return the broker
	 */
	public String getBroker() {
		return broker;
	}
	/**
	 * @param broker the broker to set
	 */
	public void setBroker(String broker) {
		this.broker = broker;
	}
	/**
	 * @return the account
	 */
	public String getAccount() {
		return account;
	}
	/**
	 * @param account the account to set
	 */
	public void setAccount(String account) {
		this.account = account;
	}
	/**
	 * @return the futprice
	 */
	public Double getFutprice() {
		return futprice;
	}
	/**
	 * @param futprice the futprice to set
	 */
	public void setFutprice(Double futprice) {
		this.futprice = futprice;
	}
	/**
	 * @return the rate
	 */
	public Double getRate() {
		return rate;
	}
	/**
	 * @param rate the rate to set
	 */
	public void setRate(Double rate) {
		this.rate = rate;
	}
	/**
	 * @return the optVar
	 */
	public Double getOptVar() {
		return optVar;
	}
	/**
	 * @param optVar the optVar to set
	 */
	public void setOptVar(Double optVar) {
		this.optVar = optVar;
	}
	/**
	 * @return the futVar
	 */
	public Double getFutVar() {
		return futVar;
	}
	/**
	 * @param futVar the futVar to set
	 */
	public void setFutVar(Double futVar) {
		this.futVar = futVar;
	}
	/**
	 * @return the sumVar
	 */
	public Double getSumVar() {
		return sumVar;
	}
	/**
	 * @param sumVar the sumVar to set
	 */
	public void setSumVar(Double sumVar) {
		this.sumVar = sumVar;
	}
	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("GreeksVar [uniqueid=");
		builder.append(uniqueid);
		builder.append(", id=");
		builder.append(id);
		builder.append(", broker=");
		builder.append(broker);
		builder.append(", account=");
		builder.append(account);
		builder.append(", futprice=");
		builder.append(futprice);
		builder.append(", rate=");
		builder.append(rate);
		builder.append(", optVar=");
		builder.append(optVar);
		builder.append(", futVar=");
		builder.append(futVar);
		builder.append(", sumVar=");
		builder.append(sumVar);
		builder.append("]");
		return builder.toString();
	}
	/* (non-Javadoc)
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		return result;
	}
	/* (non-Javadoc)
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (!(obj instanceof GreeksVar))
			return false;
		GreeksVar other = (GreeksVar) obj;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		return true;
	}
	
}
